package com.xuelang.pipeline.infrastructure.pipeline.converter;

import com.xuelang.pipeline.domain.pipeline.Tag;
import com.xuelang.pipeline.infrastructure.pipeline.dataobject.TagDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 流水线标签实体与流水线标签DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface TagToTagDOConverter {

    TagToTagDOConverter INSTANCE = Mappers.getMapper(TagToTagDOConverter.class);

    /**
     * Tag转化为TagDO
     * @param tag
     * @return
     */
    TagDO tagToTagDO(Tag tag);

    /**
     * TagDO转化为Tag
     * @param tagDO
     * @return
     */
    Tag tagDOToTag(TagDO tagDO);

}
